package cn.ecut.service;

import cn.ecut.mapper.AdminMapper;
import cn.ecut.model.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AdminService {
    @Autowired
    AdminMapper adminMapper;
    public Boolean loginCheck(Admin admin){
        return  adminMapper.loginCheck(admin);
    }

    public List<Dormitory> findAllApply(){
        return adminMapper.findAllApply();
    }

    public List<Contract> findAllContract(){
        return adminMapper.findAllContract();
    }
    public List<User> findAllUser(){
        return adminMapper.findAllUser();
    }

    public  User findUserByCondition(User user){
        return adminMapper.findUserByCondition(user);
    }
    public Contract findContractByUser(User user){
        return adminMapper.findContractByUser(user);
    }
    public List<Repair> findAllRepair(){
        return adminMapper.findAllRepair();
    }
}
